From: Giovanni Campagna Date: Thu, 21 Apr 2011 15:49:41 +0000 (+0200) Subject: PopupSliderMenuItem: intercept clicks outside the slider X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~8313 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d104f9210a8aed12bab7b99f433fe289b96bf808;p=gnome-shell.git PopupSliderMenuItem: intercept clicks outside the slider Connect to button-press-event on the menu item actor, not on the slider, so any part that is highlighted is also clicked. This means that click on the left of the volume slider is a rapid way to mute. https://bugzilla.gnome.org/show_bug.cgi?id=646660 --- diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index b1dcf498d..4e0ffea06 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -498,7 +498,7 @@ PopupSliderMenuItem.prototype = { this._slider = new St.DrawingArea({ style_class: 'popup-slider-menu-item', reactive: true }); this.addActor(this._slider, { span: -1, expand: true }); this._slider.connect('repaint', Lang.bind(this, this._sliderRepaint)); - this._slider.connect('button-press-event', Lang.bind(this, this._startDragging)); + this.actor.connect('button-press-event', Lang.bind(this, this._startDragging)); this.actor.connect('scroll-event', Lang.bind(this, this._onScrollEvent)); this._releaseId = this._motionId = 0;